from selenium.webdriver.common.by import By
class LoginPageLocators():

    # 登录标签
    login_click = (By.XPATH, '//span[text()="立即登录"]')
    username_loc = (By.XPATH, '//input[@placeholder="用户名"]')
    password_loc = (By.XPATH, '//input[@placeholder="密码"]')
    captcha = (By.XPATH, '//input[@placeholder="验证码"]')
    captcha_img = (By.XPATH, '//div[contains(@class, "login-captcha")]/img')
    # 登录按钮
    loginsbt = (By.XPATH, '//span[text()="登录"]')
    # 我的工作台
    workbench_loc = (By.LINK_TEXT, '我的工作台')
    # 取消修改密码按钮
    cancel_password_change = (By.XPATH, '//span[text()="修改密码"]/../button/i')
    # 数字化班级管理
    digital_class_management_loc = (By.XPATH, '//div[text()="数字化班级管理"]')
    # 班级简介点击
    click_class_description = (By.XPATH, '//span[text()=" 班级简介"]')
    # 班级简介/上传封面
    upload_pictures = (By.XPATH, '//label[text()="封面:"]/../div/div//input')
    ele = (By.XPATH, '//div[@role="alert"]/p')
    # 口号
    slogan = (By.XPATH, '//label[text()="口号"]/../div/div/input')
    # 管理理念
    target = (By.XPATH, '//label[text()="管理理念"]/../div/div/input')
    # 简介
    introduction = (By.XPATH, '//label[text()="简介"]/../div/div/textarea')
    # 备注
    note = (By.XPATH, '//label[text()="备注"]/../div/div/textarea')
    # 保存
    save = (By.XPATH, '//span[text()="保存"]')
    #班级简介form表单
    form_loc = (By.XPATH, '//form[@class="el-form"][1]')

    # 班级学生
    students = (By.XPATH, '//ul[@class="site-sidebar__menu el-menu"]/li[3]/span')

    # 班级资讯
    class_information = (By.XPATH, '//span[text()=" 班级资讯"]')
    # 班级资讯/年级班级下拉框
    class_box = (By.XPATH, '//input[@placeholder="请选择年级班级"]')
    class2 = (By.XPATH, '//span[text()="二年级1班"]')
    # 名称下拉框
    name_box = (By.CSS_SELECTOR, 'input[placeholder="请输入名称"]')
    # 第一条资讯删除按钮
    delete_sub = (By.XPATH, '//div[contains(@class, "scrolling-none")]//tbody/tr[1]/td[7]//span[text()="删除"]')
    delete_ensure = (By.XPATH, '//div[@aria-label="系统提示"]//span[contains(text(), "确定")]')
    delete_cancel = (By.XPATH, '//div[@aria-label="系统提示"]/div/div[3]/button[1]/span')
    # 发布资讯
    release_information = (By.XPATH, '//div[@class="el-card__body"]/div/div/div[3]/span')
    # 新建图文
    new_graphic = (By.XPATH, '//ul[@x-placement="bottom-end"]/li[1]')
    # 班级资讯类型
    class_information_types = (By.CSS_SELECTOR, 'input[placeholder="请选择班级资讯类型"]')
    # 班级之星
    class_star = (By.XPATH, '//span[text()="班级之星"]')
    # 资讯标题
    information_title = (By.CSS_SELECTOR, 'input[placeholder="请输入资讯标题"]')
    # 资讯链接标签
    label_info = (By.XPATH, '//label[contains(text(), "资讯链接")]')
    # frame
    frame = (By.XPATH, '//iframe[contains(@id, "ueditor_")]')
    # 资讯内容
    information_content = (By.XPATH, '//html[@class="view"]/body')
    # 资讯内容提示信息
    prompt = (By.XPATH, '//div[@class="el-form-item__error"]')
    # 上传封面
    input_file = (By.XPATH, '//div[@class="el-upload el-upload--text"]/input')
    # 资讯关键字
    information_keywords = (By.XPATH, '//input[@placeholder="请输入关键字"]')
    # 是否置顶
    top_place = (By.XPATH, '//label[contains(text(), "是否置顶")]/../div/label[1]/span[1]/span')
    down_place = (By.XPATH, '//label[contains(text(), "是否置顶")]/../div/label[2]/span[1]/span')
    # 提交
    submit = (By.XPATH, '//span[text()="提交"]')
    # 取消
    cancel = (By.XPATH, '//span[text()="取消"]')
    ele2 = (By.XPATH, '//div[@role="alert"]/p')
    # 转载文章
    article_reprinted = (By.XPATH, '//ul[@x-placement="bottom-end"]/li[2]')
    # 资讯链接
    information_link = (By.CSS_SELECTOR, 'input[placeholder="请输入链接地址"]')
    preview = (By.XPATH, '//span[text()="预览"]')
    # 点击预览后的iframe
    iframe = (By.CSS_SELECTOR, 'iframe[id="newsFrame"]')
    # hao123 的百度一下定位
    transfer = (By.XPATH, '//input[@value="百度一下"]')
    # 班级资讯首页年级班级下拉框
    class_box1 = (By.CSS_SELECTOR, 'div[class="el-input el-input--medium el-input--suffix"]')
    first_class = (By.XPATH, '//span[text()="二年级1班"]')
    second_class = (By.XPATH, '//span[text()="二年级2班"]')
    third_class = (By.XPATH, '//span[text()="二年级3班"]')
    # 班级资讯首页列表第一个编辑栏
    editor1 = (By.XPATH, '//div[contains(@class, "scrolling-none")]//tbody/tr[1]/td[7]//span[text()="编辑"]')
    # 编辑页资讯标题
    title = (By.XPATH, '//div[@class="el-card__body"]/form/div[3]/div/div/input')
    # 编辑页提交按钮
    submit2 = [By.XPATH, '//div[@class="el-card__body"]/form/div[8]/div/button[1]/span']
    # 编辑页取消按钮
    cancel2 = [By.XPATH, '//div[@class="el-card__body"]/form/div[8]/div/button[2]/span']
    # 名称查询输入框
    name_query = (By.CSS_SELECTOR, 'input[placeholder="请输入名称"]')
    # 查询后列表第一个文章标题栏
    article_title = (By.XPATH, '//table[@class="el-table__body"]/tbody/tr/td[2]/div')
    # 暂无数据
    no_data = (By.XPATH, '//span[@class="el-table__empty-text"]')

    # 班级相册
    # 班级相册菜单
    class_photos_menu = (By.XPATH, '//span[text()=" 班级相册"]')
    # 年级班级下拉框
    grade_class_box = (By.XPATH, '//input[@placeholder="请选择年级班级"]')
    # 一年级1班
    class1_grade1 = (By.XPATH, '//span[text()="二年级1班"]')
    # 一年级2班
    class2_grade1 = (By.XPATH, '//span[text()="二年级2班"]')
    # 标题名称输入框
    title_name = (By.XPATH, '//input[@placeholder="请输入标题名称"]')
    # 创建相册按钮
    create_pic_albums = (By.XPATH, '//div[@class="album_management"]/div[1]//span[text()="创建相册"]')
    # 创建相册/名称
    albums_name = (By.XPATH, '//input[@placeholder="请输入相册名称"]')
    # 名称提示信息
    albums_name_tips = (By.XPATH, '//div[contains(text(), "请输入名称")]')
    # 是否置顶/是
    top_y = (By.XPATH, '//label[@class="el-radio is-checked"]/span/span')
    top_n = (By.XPATH, '//label[@class="el-radio"]/span/span')
    # 所属班级
    choose_class = (By.XPATH, '//div[@aria-label="创建相册"]//input[@placeholder="请选择年级班级"]')
    # 所属班级/提示信息
    choose_class_tips = (By.XPATH, '//div[contains(text(), "请选择班级")]')
    # 一年级1班
    class1_1 = (By.XPATH, '//div[contains(@x-placement, "-start")]//span[text()="二年级1班"]')
    # 一年级2班
    class1_2 = (By.XPATH, '//div[contains(@x-placement, "-start")]//span[text()="二年级2班"]')
    # 创建相册/取消
    cancel_albums = (By.XPATH, '//div[@aria-label="创建相册"]/div[3]/div/button[1]/span')
    # 创建相册/提交
    submit_albums = (By.XPATH, '//div[@aria-label="创建相册"]/div[3]/div/button[2]/span')
    # 删除相册/系统提示  确定删除
    sure_del = (By.XPATH, '//div[@class="el-message-box"]/div[3]/button[2]/span')
    cancel_del = (By.XPATH, '//div[@class="el-message-box"]/div[3]/button[1]/span')
    # 查找
    search = (By.CSS_SELECTOR, 'input[placeholder="请输入标题名称"]')
    # 暂无数据img
    img = (By.XPATH, '/html/body/div[1]/div[2]/main/div[2]/div[1]/div/div[2]/div/img')
    # 查找后列表第一个相册
    first_albuns = (By.XPATH, '//div[@class="el-card__body"]/div[2]/div[1]/div[1]/div[2]')
    # 冬季运动会相册定位
    album_dong = (By.XPATH, '//div[@class="el-card__body"]//div[text()="冬季运动会"]')
    # 春季运动会相册定位
    album_chun = (By.XPATH, '//div[@class="el-card__body"]//div[text()="春季运动会"]')
    # 删除
    dle = (By.XPATH, '//div[@class="el-card__body"]/div[2]/div[1]/div/div[3]/button[3]/span')
    # 查看
    view = (By.XPATH, '//div[@class="el-card__body"]/div[2]/div[1]//span[text()="查看"]')
    # 查看/暂无信息
    view_pic = (By.XPATH, '//div[@class="el-card content-box text-center is-never-shadow"]/div/div[2]')
    # 查看/图片文字标签
    view_text1 = (By.XPATH, '//div[@class="el-card is-never-shadow"]/div/div[1]/label')
    view_text2 = (By.XPATH, '//div[@class="el-card is-never-shadow"]/div/div[2]/label')
    view_text3 = (By.XPATH, '//div[@class="el-card is-never-shadow"]/div/div[3]/label')
    # 取消查看
    view_cancel = (By.XPATH, '//div[@aria-label="春季运动会"]/div[3]/span/button')

    # 上传
    input_click = (By.XPATH, '//div[@class="el-card__body"]/div[2]/div[1]/div/div[3]/button[2]/span')
    # 上传input标签
    input_pic = (By.XPATH, '//label[@class="uploader-btn"]/input')
    # 上传照片/删除图标
    pic = (By.XPATH, '//span[@class="el-upload-list__item-actions"]')
    delete = (By.XPATH, '//span[@class="el-upload-list__item-delete"]')
    su = (By.XPATH, '//div[@class="el-message-box"]/div[3]/button[2]/span')
    unsu = (By.XPATH, '//div[@class="el-message-box"]/div[3]/button[1]/span')
    # 确定
    sure = (By.XPATH, '//div[@class="site-content__wrapper"]//span[text()="确定"]')
    # 取消
    unsure = (By.XPATH, '//div[@class="site-content__wrapper"]//span[text()="取消"]')
    # 提示信息
    input_tips = (By.XPATH, '//div[@role="alert"]/p')
    # 上传成功标签定位
    success_input = (By.XPATH, '//span[text()="上传成功"]')













